package day04;

import java.util.Scanner;

public class Practice01 {
    public static void main(String[] args) {


        /*for (int i = 0; i <5 ; i++) {
            System.out.println("行动是成功的阶梯");
        }
        for (int i = 1; i <=9 ; i++) {
            System.out.println(i+"x9="+i*9);
        }
        for (int i = 1; i <=9 ; i+=2) {
            System.out.println(i+"x9="+i*9);
        }
        for (int i = 9; i >=1 ; i--) {
            System.out.println(i+"x9="+i*9);
        }*///for循环：输出5次"行动是成功的阶梯"、输出9的乘法表(1到9、1/3/5/7/9、9到1)





        /*Scanner scan = new Scanner(System.in);
        int num = (int) (Math.random() * 1000 + 1);
        System.out.println("来开始猜吧");
        int guess;
        do {
            guess = scan.nextInt();
            if (guess>num) {
                System.out.println("猜大了");
            } else if (guess<num) {
                System.out.println("猜小了");
            }
        } while (guess != num);
        System.out.println("恭喜你猜对了");*///Guessing猜数字之do...while版



        /*Scanner scn = new Scanner(System.in);
        int num = (int)(Math.random()*1000+1);
        System.out.println("开始吧");
        int guess =scn.nextInt();
        while (guess!=num){
            if (guess>num) {
                System.out.println("猜大了");
                System.out.println("重新猜");
            }else {
                System.out.println("猜小了");
                System.out.println("重新猜");
            }
            guess =scn.nextInt();

        }
        System.out.println("恭喜你猜对了");*///Guessing猜数字之while版


        /*Scanner scn = new Scanner(System.in);
        System.out.println("1---存款,2---取款,3---查询,4---退出");
        int command = scn.nextInt();
        switch (command) {
            case 1:
                System.out.println("存款成功");
                break;
            case 2:
                System.out.println("取款成功");
                break;
            case 3:
                System.out.println("查询业务成功");
                break;
            case 4:
                System.out.println("退出成功");
                break;
            default:
                System.out.println("输入错误");
        }*///命令解析程序


    }
}
